<script th:inline="javascript">

   function submitForm() {
        //alert($("#id").val());
        $.post("/add/portal/menu/top.action",
        {
                id: $("#id").val(),
                name: $("#name").val(),
                sort_order: $("#sortOrder").val()
        }
        , function (data) {
            if (data && data.status == 200) {
                $("#success[[${random}]]").show();
            } else {
                $("#error[[${random}]]").show();
            }
        });
   }

</script>

<!-- Content Header (Page header) -->
<section class="content-header">
    <h1>
        顶部导航栏添加
        <small>新增顶部导航栏功能</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> 顶部导航栏维护</a></li>
        <li><a href="#">新增</a></li>
    </ol>
</section>

<!-- Main content -->
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <div id="success" th:attrappend="id=${random}" class="alert alert-success alert-dismissible" role="alert" hidden="hidden">
                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <strong>成功!</strong> 保存成功
            </div>
            <div id="error" th:attrappend="id=${random}" class="alert alert-error alert-dismissible" role="alert" hidden="hidden">
                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <strong>错误!</strong> 服务器错误 请稍后重试！
            </div>
            <form id="menutopAddForm" th:attrappend="id=${random}" method="post">
                <div class="box box-info">
                    <div class="box-header">
                        <h3 class="box-title">顶部导航栏信息
                            <small>在这里编辑导航栏信息</small>
                        </h3>
                        <!-- tools box -->
                        <div class="pull-right box-tools">
                            <button type="button" class="btn btn-info btn-sm" data-widget="save" data-toggle="tooltip"
                                    title="Save" onclick="submitForm()">
                                <i class="fa fa-check"></i></button>
                            <button type="button" class="btn btn-info btn-sm" data-widget="add" data-toggle="tooltip"
                                    title="Add">
                                <i class="fa fa-plus"></i></button>
                            <button type="button" class="btn btn-info btn-sm" data-widget="collapse"
                                    data-toggle="tooltip"
                                    title="Collapse">
                                <i class="fa fa-minus"></i></button>
                            <button type="button" class="btn btn-info btn-sm" data-widget="remove" data-toggle="tooltip"
                                    title="Remove">
                                <i class="fa fa-times"></i></button>
                        </div>
                        <!-- /. tools -->
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body pad">
                        <label>编号:</label>
                        <div class="input-group">
                            <div class="input-group-addon">
                                <i class="fa fa-laptop"></i>
                            </div>
                            <input id="id" type="text" th:attrappend="id=${random}"class="form-control" name="id"></input>
                        </div>
                    </div>
                    <div class="box-body pad">
                        <label>导航栏名称:</label>
                        <div class="input-group">
                            <div class="input-group-addon">
                                <i class="fa fa-laptop"></i>
                            </div>
                            <input id="name" type="text" th:attrappend="id=${random}"class="form-control" name="name"></input>
                        </div>
                    </div>
                    <div class="box-body pad">
                        <label>排列序号 :</label>
                        <div class="input-group" style="width: 25%;">
                            <div class="input-group-addon">
                                <i class="fa fa-laptop"></i>
                            </div>
                            <input type="text" id="sortOrder" th:attrappend="id=${random}" class="form-control" name="sortOrder"></input>
                        </div>
                    </div>
                </div>
                <!-- /.box -->
            </form>
            <!-- /.col-->
<!--
            <a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()">提交</a>
            <a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()">重置</a>-->
        </div>
    </div>
    <!-- ./row -->
</section>